package com.tuanzi.loan.web.bean.family;


import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;

import javax.annotation.PostConstruct;
import javax.faces.bean.ViewScoped;

import lombok.Data;
import lombok.EqualsAndHashCode;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;

import com.tuanzi.loan.business.entity.family.ExternalPhoneRecord;
import com.tuanzi.loan.business.service.family.ExternalPhoneRecordService;
import com.tuanzi.loan.core.aspect.Debug;
import com.tuanzi.loan.vo.request.family.ExternalShowSearchRequest;
import com.tuanzi.loan.vo.response.family.ExternalShowSearchResponse;
import com.tuanzi.loan.web.configuration.JSFListingBean;
import com.tuanzi.loan.web.lazy.family.ExternalShowLazyDataModel;
/**
 *外部手机号展示处理
 * @author Xumiaohang 2017/11/20
 *
 */
@Data
@Debug
@Component
@ViewScoped
@Transactional
@EqualsAndHashCode(callSuper = true)
@SuppressWarnings("serial")
public class ExternalShowBean extends JSFListingBean<ExternalShowSearchRequest, ExternalShowSearchResponse> {

	@Autowired
	private ExternalPhoneRecordService externalPhoneRecordService;
	
	private List<String> externalPhones;
	
	@PostConstruct
	private void init() {
		initLazyDataModel();
		externalPhones=externalPhoneRecordService.findSource();
	}

	public void onReset(){
		initLazyDataModel();
	}
	
	 private void initLazyDataModel() {
		 $ = new ExternalShowSearchRequest();
		 lazyDataModel = new ExternalShowLazyDataModel($);
	 }
}